package com.lakala.bank
{
	import org.aswing.*;
	import org.aswing.border.*;
	import org.aswing.colorchooser.*;
	import org.aswing.event.AWEvent;
	import org.aswing.ext.*;
	import org.aswing.geom.*;
	import org.aswing.table.DefaultTableModel;
	import org.aswing.table.GeneralTableCellFactory;
	public class AddCustemerInfo extends JPanel
	{
		private var tableModel:DefaultTableModel;
		public var posInfoArr:Array;
		public var merInfoArr:Array;
		//members define
		private var label43:JLabel;
		private var iptMerId:JTextField;
		private var label45:JLabel;
		private var iptMerNick:JTextField;
		private var label47:JLabel;
		private var iptPosId:JTextField;
		private var label48:JLabel;
		private var leve:JTextField;
		private var btnQuery:JButton;
		private var btnAdd:JButton;
		private var scrollPane:JScrollPane;
		private var tableInfo:JTable;
		public static const POSINFO_TABLE_COLUMN_NAME:Array=["姓名", "性别", "优先级", "阶段", "操作"];
		public function AddCustemerInfo(layout:LayoutManager=null)
		{
			setSize(new IntDimension(700, 410));
			var layout0:EmptyLayout=new EmptyLayout();
			setLayout(layout0);
			
			label43=new JLabel();
			label43.setLocation(new IntPoint(5, 5));
			label43.setSize(new IntDimension(50, 20));
			label43.setText("姓名:");
			label43.setHorizontalAlignment(AsWingConstants.LEFT);
			
			iptMerId=new JTextField();
			iptMerId.setLocation(new IntPoint(55, 5));
			iptMerId.setSize(new IntDimension(80, 21));
			iptMerId.setMaxChars(15);
			iptMerId.setRestrict("0-9");
			
			label45=new JLabel();
			label45.setLocation(new IntPoint(165, 5));
			label45.setSize(new IntDimension(60, 20));
			label45.setText("手机号:");
			label45.setHorizontalAlignment(AsWingConstants.LEFT);
			
			iptMerNick=new JTextField();
			iptMerNick.setLocation(new IntPoint(225, 5));
			iptMerNick.setSize(new IntDimension(70, 21));
			iptMerNick.setMaxChars(30);
			
			label47=new JLabel();
			label47.setLocation(new IntPoint(295, 5));
			label47.setSize(new IntDimension(70, 20));
			label47.setText("公司名称:");
			label47.setHorizontalAlignment(AsWingConstants.LEFT);
			
			iptPosId=new JTextField();
			iptPosId.setLocation(new IntPoint(365, 5));
			iptPosId.setSize(new IntDimension(60, 21));
			iptPosId.setMaxChars(8);
			iptPosId.setRestrict("0-9");
			
			label48=new JLabel();
			label48.setLocation(new IntPoint(425, 5));
			label48.setSize(new IntDimension(50, 20));
			label48.setText("优先级:");
			label48.setHorizontalAlignment(AsWingConstants.LEFT);
			
			leve=new JTextField();
			leve.setLocation(new IntPoint(475, 5));
			leve.setSize(new IntDimension(50, 21));
			leve.setMaxChars(8);
			leve.setRestrict("0-9");
			
			btnQuery=new JButton();
			btnQuery.setLocation(new IntPoint(550, 5));
			btnQuery.setSize(new IntDimension(50, 20));
			btnQuery.setText("查询");
//			btnQuery.addActionListener(onQuery);
			btnAdd=new JButton();
			btnAdd.setLocation(new IntPoint(610, 5));
			btnAdd.setSize(new IntDimension(50, 20));
			btnAdd.setText("新增");
//			btnQuery.addActionListener(onQuery);
			
			scrollPane=new JScrollPane();
			scrollPane.setLocation(new IntPoint(0, 35));
			scrollPane.setSize(new IntDimension(700, 355));
			
			tableInfo=new JTable();
			tableInfo.setSize(new IntDimension(700, 355));
			tableInfo.setSelectionMode(JTable.SINGLE_SELECTION);
			tableInfo.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
			tableInfo.setRowHeight(21);
			tableModel=new DefaultTableModel();
			tableModel.initWithDataNames(new Array(), POSINFO_TABLE_COLUMN_NAME);
			tableInfo.setModel(tableModel);
			tableModel.setColumnClass(0,"merid");
			tableModel.setColumnClass(1,"mernick");
			tableModel.setColumnClass(2,"posid");
			tableModel.setColumnClass(3,"posstat");
			tableModel.setColumnClass(4,"process");
			tableInfo.getColumnAt(0).setPreferredWidth(110);
			tableInfo.getColumnAt(1).setPreferredWidth(110);
			tableInfo.getColumnAt(2).setPreferredWidth(110);
			tableInfo.getColumnAt(3).setPreferredWidth(110);
			tableInfo.getColumnAt(4).setPreferredWidth(110);
//			tableInfo.setDefaultCellFactory("posstat",new GeneralTableCellFactory(PosInfoTableCell));
//			tableInfo.setDefaultCellFactory("process",new GeneralTableCellFactory(PosInfoButtonTableCell));
			
			//component layoution
			append(label43);
			append(iptMerId);
			append(label45);
			append(iptMerNick);
			append(label47);
			append(iptPosId);
			append(label48);
			append(leve);
			append(btnQuery);
			append(btnAdd);
			append(scrollPane);
			
			scrollPane.append(tableInfo);
			
		}
	}
}